1. Field of Invention
The present invention relates to NAND Flash, and more particularly to a method of storing and accessing error correcting code in NAND Flash.
2. Description of Related Arts
The NAND Flash is a storage medium for storing data. A NAND Flash consists of many blocks, and each block consists of a predetermined number of pages. Ordinarily, a page consists of a 2K bytes data area and a 64 bytes spare area, as shown in FIG. 1.
According to the data storage logic, each page is divided into 4 sectors, wherein each sector comprises a 512 bytes data area and a 16 bytes spare area. Electric charges of NAND Flash can maintain the status of transistors permanently. However, the electric charges are separated by oxide layers for maintaining in a stable status, and the oxide layers disappear as time goes by and are consumed by using. Finally, NAND Flash will lose function. Therefore, NAND Flash may have bad blocks during producing and using. A bad block means that one or more pages of the block have data storage errors when storing data. What's more, bad blocks have larger probability to occur as service life of NAND Flash increases. Great resource waste will be caused if simply abandoning the bad blocks when using NAND Flash.
To improve stability and efficiency of flash storage, a certain data correcting algorithm should be adopted. After being computed with the data correcting algorithm, a group of error correcting codes will be appended to the data which need to be stored. Therefore, the manufacturers of NAND Flash prepare a spare area for storing the error correcting code when designing NAND Flash memory array. For example, every 512 bytes data block is assigned a 16 bytes spare area.
Generally, encoding is processed by the sector, so the error correcting code can only be stored in a spare area which is maximum 16 bytes. The earlier technology of NAND Flash mainly adopts SLC (single-cell) technology, which has low probability of error for a single data block, and the spare area in the NAND Flash memory array is enough to store the error correcting code produced by the data correcting algorithm. However, the current technology of NAND Flash mainly adopts MLC (multi-level-cell) technology. Due to the increased density, the probability of error for a single data block increases, too. The correcting capability that a single data block needs is far larger than the requirement of the SLC technology. As a result, the 16 bytes spare area is not capable of storing all the error correcting code. A common solution to the problem mentioned above is to adopt a different correcting algorithm or reduce correcting capability. However, the solution is based on sacrificing correcting capability, and therefore can not meet the requirement of current MLC technology of NAND Flash.